Test latency jitter under stress condition Single-threaded executor Default autoware with hot path

In [1]:
from caret_analyze.plot import Plot
from caret_analyze.plot import chain_latency
from caret_analyze import Application, Architecture, Lttng
from bokeh.plotting import output_notebook, figure, show
from caret_analyze import Architecture, Application, Lttng
from bokeh.plotting import output_notebook
output_notebook()
/usr/local/lib/python3.10/dist-packages/pandas/core/arrays/masked.py:62: UserWarning: Pandas requires version '1.3.4' or newer of 'bottleneck' (version '1.3.2' currently installed).
  from pandas.core import (
Succeed to find record_cpp_impl. the C++ version will be used.
Loading BokehJS ...

End-to-End path¶

In [2]:
lttng = Lttng('./multi_threaded_executor_normal')
arch = Architecture('yaml','./architecture_with_e2e_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
169601 events found.
loading: 100%|████████████████████████████████████████████████████████████| 169601/169601 [00:04<00:00, 34275.22it/s]
In [3]:
# arch.export('architecture.yaml')
In [ ]:
# p = arch.search_paths('/FrontLidarDriver','/RayGroundFilter','/MPCController','/VehicleDBWSystem')
# p[0].summary.pprint()
In [13]:
# arch.add_path('e2e_path',p[0])
# app =Application(arch,lttng)
In [14]:
# arch.export('architecture_with_e2e_path.yaml')
In [3]:
path = app.get_path('e2e_path')
path.verify()
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'.
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'.
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'.
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'.
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/BehaviorPlanner'.
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/MPCController'.
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/VehicleInterface'.
WARNING : 2024-01-08 16:51:39 | 'caret/rclcpp' may not be used in subscriber of '/VehicleDBWSystem'.
Out[3]:
False
In [4]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[4]:
No description has been provided for this image
In [5]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[5]:
No description has been provided for this image
In [6]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision
In [7]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-08 16:51:46 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [8]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision

Hot Path¶

In [9]:
lttng = Lttng('./single_threaded_executor_normal')
arch = Architecture('yaml','./architecture_with_hot_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
146681 events found.
loading: 100%|████████████████████████████████████████████████████████████| 146681/146681 [00:04<00:00, 34180.47it/s]
In [10]:
path = app.get_path('hot_path')
path.verify()
WARNING : 2024-01-08 16:52:17 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'.
WARNING : 2024-01-08 16:52:17 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'.
WARNING : 2024-01-08 16:52:17 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'.
WARNING : 2024-01-08 16:52:17 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'.
WARNING : 2024-01-08 16:52:17 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
Out[10]:
False
In [11]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[11]:
No description has been provided for this image
In [12]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[12]:
No description has been provided for this image
In [13]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision
In [14]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-08 16:52:22 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [15]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision
In [ ]: